import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { Ab04newVO, Ab04newForm, Ab04newQuery } from '@/api/yuanshidian/ab04new/types';

/**
 * 查询新人员账户明细(缴费明细)列表
 * @param query
 * @returns {*}
 */

export const listAb04new = (query?: Ab04newQuery): AxiosPromise<Ab04newVO[]> => {
  return request({
    url: '/yuanshidian/ab04new/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询新人员账户明细(缴费明细)详细
 * @param ID
 */
export const getAb04new = (ID: string | number): AxiosPromise<Ab04newVO> => {
  return request({
    url: '/yuanshidian/ab04new/' + ID,
    method: 'get'
  });
};

/**
 * 新增新人员账户明细(缴费明细)
 * @param data
 */
export const addAb04new = (data: Ab04newForm) => {
  return request({
    url: '/yuanshidian/ab04new',
    method: 'post',
    data: data
  });
};

/**
 * 修改新人员账户明细(缴费明细)
 * @param data
 */
export const updateAb04new = (data: Ab04newForm) => {
  return request({
    url: '/yuanshidian/ab04new',
    method: 'put',
    data: data
  });
};

/**
 * 删除新人员账户明细(缴费明细)
 * @param ID
 */
export const delAb04new = (ID: string | number | Array<string | number>) => {
  return request({
    url: '/yuanshidian/ab04new/' + ID,
    method: 'delete'
  });
};
